﻿
CREATE FUNCTION dbo.IsColumnPrimeIndex
	(
	@Table sysname,
	@Column sysname
	)
RETURNS bit
AS
BEGIN
DECLARE @C int

SELECT @C=COUNT(*)
         FROM  vh_IndexColumns
         WHERE ([Index] LIKE N'pk_%') AND ([Table] = @Table) AND ([Column] = @Column)

RETURN @C
END

